Skip to content

Proposal wait timeout#871

Closed
mskrzypkows wants to merge 2 commits intomasterfrom
proposal_wait_timeout
Closed

Proposal wait timeout#871
mskrzypkows wants to merge 2 commits intomasterfrom
proposal_wait_timeout

Conversation

@mskrzypkows
Copy link
Collaborator

No description provided.

* Introduced `proposal_include_after_restart_max_timeout_sec` to `ShastaConfig` and `NodeConfig`.
* Implemented timeout logic in the transaction waiting process to enhance transaction handling.
Copilot AI review requested due to automatic review settings February 19, 2026 10:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a configurable timeout to the Shasta node startup wait that blocks on previously-sent L1 transactions being executed, preventing indefinite startup hangs after restart.

Changes:

  • Add a timeout to Node::wait_for_sent_transactions() with a warning + “proceed anyway” behavior.
  • Introduce proposal_include_after_restart_max_timeout_sec config plumbed from env (PROPOSAL_INCLUDE_AFTER_RESTART_MAX_TIMEOUT_SEC) into NodeConfig.
  • Bump workspace crate versions from 1.33.5 to 1.34.0 (and update lockfile entries).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shasta/src/node/mod.rs Adds elapsed-time tracking and timeout break condition while waiting for nonce latest/pending to converge.
shasta/src/node/config.rs Extends NodeConfig with the new timeout field.
shasta/src/lib.rs Wires the new Shasta config value into NodeConfig during node creation.
shasta/src/config/mod.rs Reads the new env var with a default and includes it in Display output.
Cargo.toml Bumps workspace package version to 1.34.0.
Cargo.lock Updates crate versions in the lockfile to 1.34.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +750 to +754
if start.elapsed().as_secs() >= timeout_sec {
warn!(
"Waiting for sent transactions exceeded timeout of {}s (Nonce Latest: {}, Nonce Pending: {}). Proceeding anyway.",
timeout_sec, nonce_latest, nonce_pending
);
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timeout check uses start.elapsed().as_secs() and a fixed 6s poll interval, so the effective wait can exceed *_max_timeout_sec by up to ~6 seconds and will overshoot small timeouts (e.g., 1–5s). Consider comparing elapsed() against Duration::from_secs(timeout_sec) and sleeping for min(poll_interval, remaining_time) (or using tokio::time::timeout) to respect the configured maximum more precisely.

Copilot uses AI. Check for mistakes.
@mskrzypkows
Copy link
Collaborator Author

Not relevant, as fees might be to high while replacing again, we need a fix on L1 node side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants